/*------------------------------------------------------
                hou_elearningGEN beta v1.0
Author: xtrung.net@gmail.com
Write On: 04/27/2008
Create On:4/13/2012 11:22:46 AM
------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace hou_elearning.Entity
{
    public class Nhomnguoidung_QuyenEntity
    {
        public Nhomnguoidung_QuyenEntity()
        {
			m_fk_inhomnguoidungid=0;
			m_fk_imaquyenid=0;
        }
		private Int16 m_fk_inhomnguoidungid;
		public Int16 FK_iNhomnguoidungID
		{
			get { return m_fk_inhomnguoidungid ; }
			set { m_fk_inhomnguoidungid = value; }
		}
		private Int16 m_fk_imaquyenid;
		public Int16 FK_iMaquyenID
		{
			get { return m_fk_imaquyenid ; }
			set { m_fk_imaquyenid = value; }
		}

        #region Comparison
        public static List<Nhomnguoidung_QuyenEntity> Sort(List<Nhomnguoidung_QuyenEntity> list, String SortExpression, String SortDirection)
        {
            string strComparisonAttrb="COMPARISON_"+SortExpression;
            PropertyInfo propInfo= typeof(Nhomnguoidung_QuyenEntity).GetProperty(strComparisonAttrb);
            if (propInfo != null)
            {
                list.Sort(propInfo.GetGetMethod().Invoke(null,null) as Comparison<Nhomnguoidung_QuyenEntity>);
                if (SortDirection == "DESC")
                    list.Reverse();
            }
            return list;
        }
        
		public static Comparison<Nhomnguoidung_QuyenEntity> COMPARISON_FK_iNhomnguoidungID
		{
			get
			{
				return delegate(Nhomnguoidung_QuyenEntity entity,Nhomnguoidung_QuyenEntity other)
				{
					return entity.FK_iNhomnguoidungID.CompareTo(other.FK_iNhomnguoidungID);
				};
			}
		}
		public static Comparison<Nhomnguoidung_QuyenEntity> COMPARISON_FK_iMaquyenID
		{
			get
			{
				return delegate(Nhomnguoidung_QuyenEntity entity,Nhomnguoidung_QuyenEntity other)
				{
					return entity.FK_iMaquyenID.CompareTo(other.FK_iMaquyenID);
				};
			}
		}
        #endregion
    }
}
